package cn.iocoder.yudao.module.product.controller.admin.spu.vo;

import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Schema(description = "管理后台 - 商品 SPU 创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuCreateReqVO extends ProductSpuBaseVO {

    // ========== SKU 相关字段 =========

    @Schema(description = "SKU 数组")
    @Valid
    private List<ProductSkuCreateOrUpdateReqVO> skus;

    @Schema(description = "Sku 类型：0商品（SKU）1包装物：钢瓶")
    private Integer productSku;

    @Schema(description = "商品是否需要容器(1独立商品,0商品+容器)")
//    @NotEmpty(message = "商品是否需要容器不能为空")
    private Integer useContainer;

    @Schema(description = "一物一码(1是，0不是)")
//    @NotEmpty(message = "一物一码不能为空")
    private Integer oneItemOneCode;

    @Schema(description = "运费模版类型(0免运费 1固定运费 2 其他模版)")
//    @NotEmpty(message = "运费模版类型不能为空")
    private Integer deliveryTemplateType;

    @Schema(description = "运费")
    private Integer deliveryPrice;

    private List<Long> nearStoreIds;
}
